package com.spa.infrastructure.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.spa.application.command.shop.ApplyRefundCommand;
import com.spa.application.dto.PageResult;
import com.spa.application.dto.shop.ApplyRefundRecordDTO;
import com.spa.application.query.shop.ApplyRefundListQuery;
import com.spa.domain.entity.ApplyRefund;
import com.spa.infrastructure.repository.condition.ApplyRefundCondition;
import com.spa.infrastructure.repository.po.ApplyRefundPO;
import org.mapstruct.Mapper;
import org.mapstruct.MapperConfig;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
@MapperConfig(unmappedTargetPolicy = ReportingPolicy.WARN)
public interface ApplyRefundMapperStruct {

    ApplyRefundMapperStruct INSTANCE = Mappers.getMapper(ApplyRefundMapperStruct.class);

    ApplyRefundPO command2Po(ApplyRefundCommand command);

    List<ApplyRefund> po2EntityList(List<ApplyRefundPO> po);
    Page<ApplyRefund> po2EntityPage(Page<ApplyRefundPO> po);
    ApplyRefund po2Entity(ApplyRefundPO po);

    ApplyRefundCondition query2Condition(ApplyRefundListQuery query);

    PageResult<ApplyRefundRecordDTO> entity2DtoPage(Page<ApplyRefund> applyRefundPage);
}
